package gatewayRouter

var (
	routerVO *RouterVO
	redisCfg *redisConfig
)

func init() {
	routerVO = &RouterVO{}
	redisCfg = &redisConfig{}
}

func BuildRouterVO(serviceType string, serviceName string, serviceUri string, redirectUri string) *RouterVO {
	return routerVO.buildVO(serviceType, serviceName, serviceUri, redirectUri)
}

func GetRouterVOParams(vo *RouterVO) (string, string, string, error) {
	return vo.getParams()
}

func GetRouterConfig() ([]*RouterVO, error) {
	return redisCfg.getConfig()
}

func SetRouterConfig(vo *RouterVO) error {
	return redisCfg.setConfig(vo)
}

func DelRouterConfig(id string) error {
	return redisCfg.delConfig(id)
}
